package mt.server;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import mt.Order;
import mt.comm.ServerComm;

public class MyServer implements MicroTraderServer {

	private RunnableServer runnableServer;
	ExecutorService executor = Executors.newFixedThreadPool(1);
	@Override
	public void start(ServerComm serverComm) {
		//set global instance of serverComm
		this.runnableServer = new RunnableServer(serverComm);
		//confirmar isto
		serverComm.start();//start the server
		
		//execut runnableServer
		executor.execute(runnableServer);
	}
}
